import VueRouter from 'vue-router'

//引入组件
import Index from '../pages'
import Home from '../pages/home/home'
import Login from '../pages/login/login'
import Register from '../pages/register/register'
import Center from '../pages/center/center'
import Forum from '../pages/forum/list'
import ForumAdd from '../pages/forum/add'
import ForumDetail from '../pages/forum/detail'
import MyForumList from '../pages/forum/myForumList'
import Storeup from '../pages/storeup/list'
import AddrList from '../pages/shop-address/list'
import AddrAdd from '../pages/shop-address/addOrUpdate'
import Order from '../pages/shop-order/list'
import OrderConfirm from '../pages/shop-order/confirm'
import Cart from '../pages/shop-cart/list'
import myMessage from '../pages/myMessage/list'
import News from '../pages/news/news-list'
import NewsDetail from '../pages/news/news-detail'
import payList from '../pages/pay'

import yonghuList from '../pages/yonghu/list'
import yonghuDetail from '../pages/yonghu/detail'
import yonghuAdd from '../pages/yonghu/add'
import zhuanjiaList from '../pages/zhuanjia/list'
import zhuanjiaDetail from '../pages/zhuanjia/detail'
import zhuanjiaAdd from '../pages/zhuanjia/add'
import chuantongwenhuajigouList from '../pages/chuantongwenhuajigou/list'
import chuantongwenhuajigouDetail from '../pages/chuantongwenhuajigou/detail'
import chuantongwenhuajigouAdd from '../pages/chuantongwenhuajigou/add'
import zuopinfenleiList from '../pages/zuopinfenlei/list'
import zuopinfenleiDetail from '../pages/zuopinfenlei/detail'
import zuopinfenleiAdd from '../pages/zuopinfenlei/add'
import yipinleixingList from '../pages/yipinleixing/list'
import yipinleixingDetail from '../pages/yipinleixing/detail'
import yipinleixingAdd from '../pages/yipinleixing/add'
import chuantongfenleiList from '../pages/chuantongfenlei/list'
import chuantongfenleiDetail from '../pages/chuantongfenlei/detail'
import chuantongfenleiAdd from '../pages/chuantongfenlei/add'
import chuanchengrengushiList from '../pages/chuanchengrengushi/list'
import chuanchengrengushiDetail from '../pages/chuanchengrengushi/detail'
import chuanchengrengushiAdd from '../pages/chuanchengrengushi/add'
import chuantongyishuzhanList from '../pages/chuantongyishuzhan/list'
import chuantongyishuzhanDetail from '../pages/chuantongyishuzhan/detail'
import chuantongyishuzhanAdd from '../pages/chuantongyishuzhan/add'
import gujianzhuList from '../pages/gujianzhu/list'
import gujianzhuDetail from '../pages/gujianzhu/detail'
import gujianzhuAdd from '../pages/gujianzhu/add'
import chuantongfushizhanList from '../pages/chuantongfushizhan/list'
import chuantongfushizhanDetail from '../pages/chuantongfushizhan/detail'
import chuantongfushizhanAdd from '../pages/chuantongfushizhan/add'
import chuantongyinleList from '../pages/chuantongyinle/list'
import chuantongyinleDetail from '../pages/chuantongyinle/detail'
import chuantongyinleAdd from '../pages/chuantongyinle/add'
import chuantongyinleWel from '../pages/chuantongyinle/wel'
import wenxuezuopinList from '../pages/wenxuezuopin/list'
import wenxuezuopinDetail from '../pages/wenxuezuopin/detail'
import wenxuezuopinAdd from '../pages/wenxuezuopin/add'
import shouyizhizuoList from '../pages/shouyizhizuo/list'
import shouyizhizuoDetail from '../pages/shouyizhizuo/detail'
import shouyizhizuoAdd from '../pages/shouyizhizuo/add'
import canjiazhizuoList from '../pages/canjiazhizuo/list'
import canjiazhizuoDetail from '../pages/canjiazhizuo/detail'
import canjiazhizuoAdd from '../pages/canjiazhizuo/add'
import wenwujiandingList from '../pages/wenwujianding/list'
import wenwujiandingWel from '../pages/wenwujianding/wel'
import wenwujiandingDetail from '../pages/wenwujianding/detail'
import wenwujiandingAdd from '../pages/wenwujianding/add'
import chuantongwenhuaList from '../pages/chuantongwenhua/list'
import chuantongwenhuaDetail from '../pages/chuantongwenhua/detail'
import chuantongwenhuaAdd from '../pages/chuantongwenhua/add'
import shangpinxinxiList from '../pages/shangpinxinxi/list'
import shangpinxinxiDetail from '../pages/shangpinxinxi/detail'
import shangpinxinxiAdd from '../pages/shangpinxinxi/add'
import newstypeList from '../pages/newstype/list'
import newstypeDetail from '../pages/newstype/detail'
import newstypeAdd from '../pages/newstype/add'
import aboutusList from '../pages/aboutus/list'
import aboutusDetail from '../pages/aboutus/detail'
import aboutusAdd from '../pages/aboutus/add'
import systemintroList from '../pages/systemintro/list'
import systemintroDetail from '../pages/systemintro/detail'
import systemintroAdd from '../pages/systemintro/add'
import discussgujianzhuList from '../pages/discussgujianzhu/list'
import discussgujianzhuDetail from '../pages/discussgujianzhu/detail'
import discussgujianzhuAdd from '../pages/discussgujianzhu/add'
import discusswenxuezuopinList from '../pages/discusswenxuezuopin/list'
import discusswenxuezuopinDetail from '../pages/discusswenxuezuopin/detail'
import discusswenxuezuopinAdd from '../pages/discusswenxuezuopin/add'
import discussshouyizhizuoList from '../pages/discussshouyizhizuo/list'
import discussshouyizhizuoDetail from '../pages/discussshouyizhizuo/detail'
import discussshouyizhizuoAdd from '../pages/discussshouyizhizuo/add'
import discusschuantongwenhuaList from '../pages/discusschuantongwenhua/list'
import discusschuantongwenhuaDetail from '../pages/discusschuantongwenhua/detail'
import discusschuantongwenhuaAdd from '../pages/discusschuantongwenhua/add'
import discussshangpinxinxiList from '../pages/discussshangpinxinxi/list'
import discussshangpinxinxiDetail from '../pages/discussshangpinxinxi/detail'
import discussshangpinxinxiAdd from '../pages/discussshangpinxinxi/add'
import recommendations from '../pages/recommendations/list'

import myFollowList from '../pages/myFollowList/list'

import Travel from '../pages/Travel/list'
import welTravel from '../pages/Travel/wel'
import addTravel from '../pages/Travel/add'
import detailTravel from '../pages/Travel/detail'

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err)
}

//配置路由
export default new VueRouter({
	routes:[
		{
      path: '/',
      redirect: '/index/home'
    },
		{
			path: '/index',
			component: Index,
			children:[
				{
					path: 'travel',
					component: Travel
				},
				{
					path: 'welTravel',
					component: welTravel
				},
				{
					path: 'addTravel',
					component: addTravel
				},
				{
					path: 'detailTravel',
					component: detailTravel
				},
				{
					path: 'home',
					component: Home
				},
				{
					path: 'recommendations',
					component: recommendations
				},
				{
					path: 'myFollowList',
					component: myFollowList
				},
				{
					path: 'center',
					component: Center,
				},
				{
					path: 'pay',
					component: payList,
				},
				{
					path: 'forum',
					component: Forum
				},
				{
					path: 'forumAdd',
					component: ForumAdd
				},
				{
					path: 'forumDetail',
					component: ForumDetail
				},
				{
					path: 'myForumList',
					component: MyForumList
				},
				{
					path: 'storeup',
					component: Storeup
				},
                {
                    path: 'shop-address/list',
                    component: AddrList
                },
                {
                    path: 'shop-address/addOrUpdate',
                    component: AddrAdd
                },
				{
					path: 'shop-order/order',
					component: Order
				},
				{
					path: 'cart',
					component: Cart
				},
				{
					path: 'my-message',
					component: myMessage
				},
				{
					path: 'shop-order/orderConfirm',
					component: OrderConfirm
				},
				{
					path: 'news',
					component: News
				},
				{
					path: 'newsDetail',
					component: NewsDetail
				},
				{
					path: 'yonghu',
					component: yonghuList
				},
				{
					path: 'yonghuDetail',
					component: yonghuDetail
				},
				{
					path: 'yonghuAdd',
					component: yonghuAdd
				},
				{
					path: 'zhuanjia',
					component: zhuanjiaList
				},
				{
					path: 'zhuanjiaDetail',
					component: zhuanjiaDetail
				},
				{
					path: 'zhuanjiaAdd',
					component: zhuanjiaAdd
				},
				{
					path: 'chuantongwenhuajigou',
					component: chuantongwenhuajigouList
				},
				{
					path: 'chuantongwenhuajigouDetail',
					component: chuantongwenhuajigouDetail
				},
				{
					path: 'chuantongwenhuajigouAdd',
					component: chuantongwenhuajigouAdd
				},
				{
					path: 'zuopinfenlei',
					component: zuopinfenleiList
				},
				{
					path: 'zuopinfenleiDetail',
					component: zuopinfenleiDetail
				},
				{
					path: 'zuopinfenleiAdd',
					component: zuopinfenleiAdd
				},
				{
					path: 'yipinleixing',
					component: yipinleixingList
				},
				{
					path: 'yipinleixingDetail',
					component: yipinleixingDetail
				},
				{
					path: 'yipinleixingAdd',
					component: yipinleixingAdd
				},
				{
					path: 'chuantongfenlei',
					component: chuantongfenleiList
				},
				{
					path: 'chuantongfenleiDetail',
					component: chuantongfenleiDetail
				},
				{
					path: 'chuantongfenleiAdd',
					component: chuantongfenleiAdd
				},
				{
					path: 'chuanchengrengushi',
					component: chuanchengrengushiList
				},
				{
					path: 'chuanchengrengushiDetail',
					component: chuanchengrengushiDetail
				},
				{
					path: 'chuanchengrengushiAdd',
					component: chuanchengrengushiAdd
				},
				{
					path: 'chuantongyishuzhan',
					component: chuantongyishuzhanList
				},
				{
					path: 'chuantongyishuzhanDetail',
					component: chuantongyishuzhanDetail
				},
				{
					path: 'chuantongyishuzhanAdd',
					component: chuantongyishuzhanAdd
				},
				{
					path: 'gujianzhu',
					component: gujianzhuList
				},
				{
					path: 'gujianzhuDetail',
					component: gujianzhuDetail
				},
				{
					path: 'gujianzhuAdd',
					component: gujianzhuAdd
				},
				{
					path: 'chuantongfushizhan',
					component: chuantongfushizhanList
				},
				{
					path: 'chuantongfushizhanDetail',
					component: chuantongfushizhanDetail
				},
				{
					path: 'chuantongfushizhanAdd',
					component: chuantongfushizhanAdd
				},
				{
					path: 'chuantongyinle',
					component: chuantongyinleList
				},
				{
					path: 'chuantongyinleDetail',
					component: chuantongyinleDetail
				},
				{
					path: 'chuantongyinleAdd',
					component: chuantongyinleAdd
				},
				{
					path: 'chuantongyinleWel',
					component: chuantongyinleWel
				},
				{
					path: 'wenxuezuopin',
					component: wenxuezuopinList
				},
				{
					path: 'wenxuezuopinDetail',
					component: wenxuezuopinDetail
				},
				{
					path: 'wenxuezuopinAdd',
					component: wenxuezuopinAdd
				},
				{
					path: 'shouyizhizuo',
					component: shouyizhizuoList
				},
				{
					path: 'shouyizhizuoDetail',
					component: shouyizhizuoDetail
				},
				{
					path: 'shouyizhizuoAdd',
					component: shouyizhizuoAdd
				},
				{
					path: 'canjiazhizuo',
					component: canjiazhizuoList
				},
				{
					path: 'canjiazhizuoDetail',
					component: canjiazhizuoDetail
				},
				{
					path: 'canjiazhizuoAdd',
					component: canjiazhizuoAdd
				},
				{
					path: 'wenwujianding',
					component: wenwujiandingList
				},
				{
					path: 'wenwujiandingWel',
					component: wenwujiandingWel
				},
				{
					path: 'wenwujiandingDetail',
					component: wenwujiandingDetail
				},
				{
					path: 'wenwujiandingAdd',
					component: wenwujiandingAdd
				},
				{
					path: 'chuantongwenhua',
					component: chuantongwenhuaList
				},
				{
					path: 'chuantongwenhuaDetail',
					component: chuantongwenhuaDetail
				},
				{
					path: 'chuantongwenhuaAdd',
					component: chuantongwenhuaAdd
				},
				{
					path: 'shangpinxinxi',
					component: shangpinxinxiList
				},
				{
					path: 'shangpinxinxiDetail',
					component: shangpinxinxiDetail
				},
				{
					path: 'shangpinxinxiAdd',
					component: shangpinxinxiAdd
				},
				{
					path: 'newstype',
					component: newstypeList
				},
				{
					path: 'newstypeDetail',
					component: newstypeDetail
				},
				{
					path: 'newstypeAdd',
					component: newstypeAdd
				},
				{
					path: 'aboutus',
					component: aboutusList
				},
				{
					path: 'aboutusDetail',
					component: aboutusDetail
				},
				{
					path: 'aboutusAdd',
					component: aboutusAdd
				},
				{
					path: 'systemintro',
					component: systemintroList
				},
				{
					path: 'systemintroDetail',
					component: systemintroDetail
				},
				{
					path: 'systemintroAdd',
					component: systemintroAdd
				},
				{
					path: 'discussgujianzhu',
					component: discussgujianzhuList
				},
				{
					path: 'discussgujianzhuDetail',
					component: discussgujianzhuDetail
				},
				{
					path: 'discussgujianzhuAdd',
					component: discussgujianzhuAdd
				},
				{
					path: 'discusswenxuezuopin',
					component: discusswenxuezuopinList
				},
				{
					path: 'discusswenxuezuopinDetail',
					component: discusswenxuezuopinDetail
				},
				{
					path: 'discusswenxuezuopinAdd',
					component: discusswenxuezuopinAdd
				},
				{
					path: 'discussshouyizhizuo',
					component: discussshouyizhizuoList
				},
				{
					path: 'discussshouyizhizuoDetail',
					component: discussshouyizhizuoDetail
				},
				{
					path: 'discussshouyizhizuoAdd',
					component: discussshouyizhizuoAdd
				},
				{
					path: 'discusschuantongwenhua',
					component: discusschuantongwenhuaList
				},
				{
					path: 'discusschuantongwenhuaDetail',
					component: discusschuantongwenhuaDetail
				},
				{
					path: 'discusschuantongwenhuaAdd',
					component: discusschuantongwenhuaAdd
				},
				{
					path: 'discussshangpinxinxi',
					component: discussshangpinxinxiList
				},
				{
					path: 'discussshangpinxinxiDetail',
					component: discussshangpinxinxiDetail
				},
				{
					path: 'discussshangpinxinxiAdd',
					component: discussshangpinxinxiAdd
				},
			]
		},
		{
			path: '/login',
			component: Login
		},
		{
			path: '/register',
			component: Register
		},
	]
})
